A YUM repository is a publically (or privately) accessible directory that can serve out packages for others to access and use. The following instructions will detail how to create your own YUM Repository.
Create a folder that will be available to other users (or available to the public): mkdir /var/www/html/MyRepo
Put all signed packages in that directory
Run this command to create the repository metadata for the newly created directory: createrepo <Directory to be served>
ex: createrepo /var/www/html/MyRepo
This command will create a new folder within that folder structure called "repodata"
Serve up the Directory:
Once the repository is constructed it must be made available. In this example the we are using Apache to serve the MyRepo directory so you will need to perform the following tasks:
Edit /etc/httpd/conf/httpd.conf and add the following: <Directory /var/www/html/MyRepo>Options +Indexes</Directory>
This will allow directory indexing, or, files in the /var/www/html/MyRepo directory will be listed when viewed in a web browser.
2. Restart the Apache service: service httpd restart
3. The YUM Repository should now be accessible at http:<webserver address>/MyRepo
Creating a YUM Repository
A YUM repository is a publically (or privately) accessible directory that can serve out packages for others to access and use. The following instructions will detail how to create your own YUM Repository.
- Create a folder that will be available to other users (or available to the public): mkdir /var/www/html/MyRepo
- Put all signed packages in that directory
- Run this command to create the repository metadata for the newly created directory: createrepo <Directory to be served>
ex: createrepo /var/www/html/MyRepoThis command will create a new folder within that folder structure called "repodata"
Serve up the Directory:
Once the repository is constructed it must be made available. In this example the we are using Apache to serve the MyRepo directory so you will need to perform the following tasks:
- Edit /etc/httpd/conf/httpd.conf and add the following:
This will allow directory indexing, or, files in the /var/www/html/MyRepo directory will be listed when viewed in a web browser.<Directory /var/www/html/MyRepo>Options +Indexes</Directory>
2. Restart the Apache service: service httpd restart
3. The YUM Repository should now be accessible at http:<webserver address>/MyRepo